package com.mifengkong.frwidget.banner.customerbanner;

import android.content.Context;
import android.view.animation.Interpolator;
import android.widget.Scroller;

/**
 * Created by jiangyongxing on 2017/8/25.
 * 描述：
 */

public class BannerScroller extends Scroller {

    private int mScrollerDuration = 850;//动画持续的时间

    public BannerScroller(Context context) {
        super(context);
    }

    public BannerScroller(Context context, Interpolator interpolator) {
        super(context, interpolator);
    }

    public BannerScroller(Context context, Interpolator interpolator, boolean flywheel) {
        super(context, interpolator, flywheel);
    }

    public void setScrollerDuration(int duration) {
        mScrollerDuration = duration;
    }

    @Override
    public void startScroll(int startX, int startY, int dx, int dy, int duration) {
        super.startScroll(startX, startY, dx, dy, mScrollerDuration);

    }
}
